﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace ContosoUniversity.Models
{
    public enum Grade
    {
        A, B, C, D, F
    }
    /// <summary>
    /// 招生和注册类
    /// </summary>
    public class Enrollment
    {
        public int EnrollmentID { get; set; }

        /// <summary>
        /// 外键属性
        /// </summary>
        public int CourseID { get; set; }
        /// <summary>
        /// 导航属性
        /// </summary>
        public Course Course { get; set; }


        /// <summary>
        /// 外键属性
        /// </summary>
        public int StudentID { get; set; }

        [DisplayFormat(NullDisplayText = "No Grade")]
        public Grade? Grade { get; set; }

        /// <summary>
        /// 导航属性
        /// </summary>
        public Student Student { get; set; }

    }
}
